package com.polaris.live.widget.match_botton

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.polaris.live.common.constant.PagConst.FREE_CARD_PAG
import com.polaris.live.common.constant.PagConst.USER_PROFILE_FREE_MATCH_PAG
import com.polaris.live.common.constant.PagConst.USER_SPACE_PHONE_PAG
import com.polaris.live.databinding.WidgetUserProfileFreeMatchBinding

/**
 * 用户资料卡片的freematch按钮
 *
 * @author Created by 半仙 on 2023/11/3/003 9:37
 */
class UserProfilePopupFreeMatch(context: Context, attributeSet: AttributeSet) :
    ConstraintLayout(context, attributeSet) {
    
    private val mBinding = WidgetUserProfileFreeMatchBinding.inflate(LayoutInflater.from(context), this, true)

    init {
        mBinding.callIcon.apply {
            path = FREE_CARD_PAG
            setRepeatCount(-1)
            play()
        }
        mBinding.pagView.apply {
            path = USER_PROFILE_FREE_MATCH_PAG
            setRepeatCount(-1)
            play()
        }
        mBinding.pagPhone.apply {
            visibility = View.VISIBLE
            path = USER_SPACE_PHONE_PAG
            setRepeatCount(-1)
            play()
        }
    }
}